package com.lyf.shop.service.impl;

import com.alibaba.nacos.shaded.org.checkerframework.checker.units.qual.A;
import com.lyf.common.datascope.annotation.DataScope;
import com.lyf.shop.domain.IndexQueryFrom;
import com.lyf.shop.mapper.IndexMapper;
import com.lyf.shop.service.INumberTotalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * @Author: lyf
 * @CreateTime: 2023-04-18
 * @description:
 */

@Service
public class INumberTotalServiceImpl implements INumberTotalService {


    @Autowired
     private IndexMapper indexMapper;


    @Override
    public List<Long> numberTotal(IndexQueryFrom queryFrom) {

        return indexMapper.numberTotal(queryFrom);
    }

    @Override
    @DataScope(deptAlias = "d")
    public List<BigDecimal> amountTotal(IndexQueryFrom queryFrom) {
        return indexMapper.amountTotal(queryFrom);
    }

    @Override
    public List<IndexQueryFrom> lineAmountTotal(IndexQueryFrom queryFrom) {
        List<IndexQueryFrom> lineAmountTotal = indexMapper.lineAmountTotal(queryFrom);
        return lineAmountTotal;
    }
}
